#include <iostream>
#include <string> // for strcpy

using namespace std;
class person
{
	char name[20];
	int yob; //Year of birth
	int yor; // Year of death

public:

	person()
	{ 
     strcpy(name,"N.A.");
     yob=2000; yor=2000;
	}

	void getdata()
	{
		cout<<"Enter the name: ";
		cin.getline(name,19);
		cout<<"Enter the year of birth: ";
		cin>>yob;
		cout<<"Enter the year of retirement: ";
		cin>>yor;
	}

	void print()
	{
		cout<<"Name: "<<name<<"\n";
		cout<<"Year of Birth: "<<yob<<"\n";
		cout<<"Year of Retirement: "<<yor<<"\n";
	}
}; //end of the class


int main(int argc, int **argv)
{
  // demonstrating the working for single object
  person p;
  //getting the input
  p.getdata();
  //displaying the i/p data
  p.print();
}

